package tnp.modules;

import org.apache.ibatis.session.SqlSessionFactory;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;

/**
 */
public class ApplicationModule extends AbstractModule {

	@Override
	protected void configure() {
		bindConstant().annotatedWith(Names.named("ibatis.classpathResource")).to(
					"tnp/ibatis-config.xml");
		bindConstant().annotatedWith(Names.named("ibatis.environment")).to("local-dev");
		bind(SqlSessionFactory.class).toProvider(XmlSqlSessionFactoryProvider.class).asEagerSingleton();

	}
}